﻿using Xunit;
using YAPL.Language.Ast;

namespace YAPL.Test.YAPL.Language.Ast {

	public class ReturnExpressionTest {
		[Fact]
		public void NodeEqualsShouldWorkCorrectly() {
			var return1 = Expressions.ReturnStatement(Expressions.StringLiteral("dd"));
			var return2 = Expressions.ReturnStatement(Expressions.StringLiteral("dd"));
			Assert.False(return1.NodeEquals(null));
			Assert.False(return2.NodeEquals(null));
			Assert.True(return1.NodeEquals(return1));
			Assert.True(return1.NodeEquals(return2));

			Assert.False(return1.NodeEquals(Expressions.StringLiteral("dd")));
		}
	}
}
